﻿// BusinessLicenseCreateDto.cs（DTO 补充）
using Microsoft.EntityFrameworkCore;
using SimpleWebApi.MyMigration.Models.BusinessLicenseManagement;
using System.ComponentModel.DataAnnotations;
using static SimpleWebApi.MyMigration.AdvancedCustomerDbContext;
using System.ComponentModel.DataAnnotations.Schema;

namespace SimpleWebApi.Business.Service.Interface.DTO.BusinessLicenseDTO
{
    public class BusinessLicenseCreateDto
    {
        [StringLength(18, MinimumLength = 18)]
        [Column(TypeName = "varchar(18)")]
        public string? CreditCode { get; set; } // 企业信用代码（唯一）


        [StringLength(100)]
        public string? TradeName { get; set; } // 企业字号

        public string? RegisteredCapital { get; set; } // 注册资金

        public int? EmployeeCount { get; set; } // 从业人数

        public CompanyType? CompanyType { get; set; }  // 企业类型

        [StringLength(500)]
        public string? BusinessScope { get; set; } // 经营范围

        [StringLength(255)]
        public string? BusinessAddress { get; set; } // 经营场所
                
        // 法人操作（已有或新建）
        public int? LegalPersonId { get; set; }
        public LegalPersonCreateDto? LegalPersonCreate { get; set; }

        // 关联人操作列表（允许空）
        public List<RelatedPersonOperationDto>? RelatedPersons { get; set; }
    }    

    //public class RelatedPersonOperationDto
    //{
    //    // 关联人操作：要么通过 ID 选择，要么新建
    //    public int? RelatedPersonId { get; set; }
    //    public RelatedPersonCreateDto? RelatedPersonCreate { get; set; }
    //}

    
}